/*实现有一行电文，按照将第一个字母变成第26个字母，第i个字母变成第（26-i+1）个字母，非字母字符不变，要求编程将传入的密文翻译回原文。
*/
#include<stdio.h>
#include<string.h>
#define BUFFER_SIZE 100

void decode(char * str)
{
    for (int i = 0; str[i] != '\0'; i++)
    {
        if ((str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z'))
        {
            if (str[i] >= 'a' && str[i] <= 'z')
            {
                str[i] = 'a' + ('z' - str[i]);
            }
            else if (str[i] >= 'A' && str[i] <= 'Z')
            {
                str[i] = 'A' + ('Z' - str[i]);
            }
            
        }     
    }
}  
int main(void) 
{
    char ch[BUFFER_SIZE];
    fgets(ch, BUFFER_SIZE, stdin);
    ch[strcspn(ch, "\n")] = 0;
    decode(ch);
    printf("%s", ch);
    return 0;
}

